home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / util_arc / 4archiv3.zip / 4ZIP.BTM (.txt) < prev    next >
4DOS Compressed Batch-To-Memory File  |  1994-06-08  |  49KB  |  936 lines

  1. @Echo off
  2.    setdos /i+log^log off^setdos /v0^setlocal^unalias *^unset /q PKZIP.CFG PKUNZIP PKZIP^setdos /v0^alias snd=`beep 300 2^beep 500 2^beep 700 1^beep 900 2`
  3.    if exist %@path[%@search[4zip.btm]]\descript.ion describe %@search[4zip.btm] "4DOS archiver for Pkware PK(UN)ZIP" >& nul
  4.    if not isdir %Temp set Temp=%_Boot:^set Pktmp=%Temp^alias check `if "%1" eq "" goto Mainscreen`^Alias # `scrput`
  5.    iff %1 eq /? then^cls^gosub Info^cancel^elseiff %1 eq /H then^4dos //BrightBg=Yes /c %@search[4ziphelp.com]^cls^cancel^endiff
  6.    iff %@len[%1] ne 0 .and. "%1" ne "/P" then^beep^cls^ screen 00 01 %@upper[%0] does not accept these parameters^gosub Info^cancel^endiff
  7.  
  8. :Errorcheck
  9.    iff "%_4Ver" lt "5" then^cls^beep 1000 09
  10.      screen 01 01 This program requires 4DOS 5.00 or higher, on this system 4DOS %_4Ver
  11.      screen 02 01 is installed. Please contact J.P. Software for an upgrade version^cancel
  12.    endiff
  13.  
  14.    iff not exist %@search[pkzip.exe] .or. not exist %@search[pkunzip.exe] then^cls^beep 1000 09
  15.      screen 01 01 Programs PKZIP and PKUNZIP are needed for %@upper[%0] but cannot be located
  16.      screen 02 01 Place PKUNZIP.EXE and PKZIP.EXE in your PATH and restart^cancel
  17.    endiff
  18.  
  19.    iff %@name[%0] ne 4ZIP then^cls^beep 1000 09
  20.      screen 01 01 %@upper[%@filename[%0]] is not the original name of this programm,
  21.      screen 02 01 please rename %@upper[%@filename[%0]] back into 4ZIP and restart^cancel
  22.    endiff
  23.  
  24.    iff %_kstack eq 0 then^cls^beep 1000 09
  25.      screen 01 01 Program KSTACK.COM is needed for 4ZIP.BTM is not loaded
  26.      screen 02 01 Load KSTACK.COM in memory and re-run 4ZIP.BTM^cancel
  27.    endiff
  28.  
  29. :Load
  30.    :**********************************************************************
  31.    :* Check for the /P switch and decide if a secundairy-shell is needed *
  32.    :**********************************************************************
  33.    if "%1" eq "/P" goto CFG_Check
  34.    4dos.com //BrightBg=Yes //EnvFree=800 //NormalKey=F1 //4StartPath=%Temp /C %0 /P^cancel
  35.  
  36. :CFG_Check
  37.    :***********************************************************************
  38.    :* Load default input-values, look for the 4ZIP configurationfile and  *
  39.    :* load it, if it does not exist load the default configuration-values *
  40.    :***********************************************************************
  41.    set Archivepath=%@upper[%[_cwds]*.*]^set Targetpath=%@upper[%[_cwds]archive.zip]
  42.    if %@len[%Archivepath] gt 37 set Archivepath=%_Boot:\*.*^if %@len[%Targetpath] gt 37 set Targetpath=%_Boot:\ARCHIVE.ZIP
  43.    set Sourcepath=%@upper[%[_cwds]archive.zip]^set Extractpath=%@upper[%[_cwd]]
  44.    if %@len[%Sourcepath] gt 37 set Sourcepath=%_Boot:\ARCHIVE.ZIP^if %@len[%Extractpath] gt 36 set Extractpath=%_Boot:\
  45.    set Origcolor=%_fg on %_bg border %_bg
  46.    set Message=`Wrong inputvalues or combination of values is not allowed !`
  47.  
  48.    iff exist %@search[4zip.cfg] then^pushd %@path[%@search[4zip.cfg]]
  49.      copy 4zip.cfg 4ziptmp.btm >& nul^call %@search[4ziptmp.btm]
  50.      del 4ziptmp.btm >& nul^popd^goto Mainscreen
  51.    endiff
  52.  
  53.    set Method=D ^set Mask=N^set Attribute=N^set Zipdate=N
  54.    set Comment=N^set AV=N^set Exe=D^set Workdir=N^set Ansi=N
  55.    goto Mainscreen
  56.  
  57. :CFG_Create
  58.    :**********************************************************************
  59.    :* Create a new CFG-file, also check the PATH if the new created file *
  60.    :* can be re-located and delete it if not. This subroutine should not *
  61.    :* be used if 4DOS batch-compresser BATCOMP.EXE isn't available.      *
  62.    :**********************************************************************
  63.    set Message=`Busy saving configuration in %@upper[%Cfgpath] ....`^gosub Messagebox^snd
  64.    if exist %@search[4zip.cfg]         del /q %@search[4zip.cfg]
  65.    if exist %@search[4ziptmp.*]        del /q %@search[4ziptmp.*]
  66.    if exist %@path[%Cfgpath]\4ziptmp.* del /q %@path[%Cfgpath]\4ziptmp.*
  67.  
  68.    echo set Method=%Method       >>! %@path[%Cfgpath]\4ziptmp.bat
  69.    echo set Mask=%Mask           >>! %@path[%Cfgpath]\4ziptmp.bat
  70.    echo set Attribute=%Attribute >>! %@path[%Cfgpath]\4ziptmp.bat
  71.    echo set Zipdate=%Zipdate     >>! %@path[%Cfgpath]\4ziptmp.bat
  72.    echo set Comment=%Comment     >>! %@path[%Cfgpath]\4ziptmp.bat
  73.    echo set AV=%AV               >>! %@path[%Cfgpath]\4ziptmp.bat
  74.    echo set Exe=%Exe             >>! %@path[%Cfgpath]\4ziptmp.bat
  75.    echo set Workdir=%Workdir     >>! %@path[%Cfgpath]\4ziptmp.bat
  76.    echo set Ansi=%Ansi           >>! %@path[%Cfgpath]\4ziptmp.bat
  77.  
  78.    pushd %@path[%Cfgpath]^batcomp /o 4ziptmp.bat >& nul^copy 4ziptmp.btm 4zip.cfg >& nul
  79.    if exist descript.ion describe 4zip.cfg "Configuration for 4DOS archiver 4ZIP.BTM"
  80.    del 4ziptmp.* >& nul^popd
  81.    pushd %Temp
  82.    iff not exist %@search[4zip.cfg] then^set Error=Y^del %Cfgpath >& nul^endiff
  83.    popd^return
  84.  
  85. :ZipErrors
  86.    iff errorlevel eq 02 .or.  errorlevel eq 03 then^echo Warning: Error in ZIP-file^endiff
  87.    iff errorlevel ge 04 .and. errorlevel le 11 then^echo Warning: Not enough memory for 4ZIP.BTM^endiff
  88.    if  errorlevel eq 01 echo Warning: Bad file name or file specification
  89.    if  errorlevel eq 12 echo Warning: No files found to add to the ZIP-file
  90.    if  errorlevel eq 14 echo Warning: Disk Full
  91.    if  errorlevel eq 15 echo Warning: The ZIP-file is marked read-only and can not be modified
  92.    if  errorlevel eq 17 echo Warning: Too many files
  93.    if  errorlevel eq 19 echo Warning: Could not open file
  94.    if errorlevel eq 255 echo Warning: User pressed CTRL-C or CRTL-BREAK
  95.    return
  96.  
  97. :UnZipErrors
  98.    iff errorlevel eq 02 .or.  errorlevel eq 03 then^echo Warning: Error in ZIP-file^endiff
  99.    iff errorlevel ge 04 .and. errorlevel le 08 then^echo Warning: Not enough memory for 4ZIP.BTM^endiff
  100.    iff errorlevel eq 09 .or.  errorlevel eq 11 then^echo Warning: No ZIP-file(s) found to process^endiff
  101.    if  errorlevel eq 50 echo Warning: Disk Full
  102.    if  errorlevel eq 51 echo Warning: Unexpected End of File in ZIP-file
  103.    if errorlevel eq 255 echo Warning: User pressed CRTL-C or CTRL-BREAK
  104.    return
  105.  
  106. :Info
  107.    screen 09 00
  108.    # 02 01 %_Fg on %_Bg Syntax:  %@upper[%@name[%0]] [/P] [/H] [/?]
  109.    # 04 10 %_Fg on %_Bg /P = Skip test for brightcolor and environmentsize
  110.    # 05 15 %_Fg on %_Bg and do not load a secundary shell
  111.    # 06 10 %_Fg on %_Bg /H = Starts the 4ZIPHELP.COM program if available
  112.    # 07 10 %_Fg on %_Bg /? = This helpscreen
  113.    return
  114.  
  115. :Mainhelp
  116.    # 03 21 blu on bri blu %@repeat[%@char[255],52]
  117.    # 04 21 blu on bri blu %@repeat[%@char[255],52]
  118.    # 05 21 blu on bri blu %@repeat[%@char[255],52]
  119.    drawbox 03 10 05 72 02 bla on bri yel shadow
  120.    # 04 11 blu on bri yel %@repeat[%@char[255],61]
  121.    # 04 12 blu on bri yel Give menu-option on which you would like some help ...
  122.    screen 04 67^inkey /c /p /k"123456[Esc]" %%Mainchoice^if "%Mainchoice" eq "" (gosub Topscreen^goto Mainchoices)
  123.    iff "%Mainchoice" eq "1" then^set Message=`Use this option to ADD, MOVE or UPDATE files in a ZIP-file!`^gosub Messagebox^goto Mainchoices^endiff
  124.    iff "%Mainchoice" eq "2" then^set Message=`Use this option to EXTRACT files from an existing ZIP-file!`^gosub Messagebox^goto Mainchoices^endiff
  125.    iff "%Mainchoice" eq "3" then^set Message=`Use this option to VIEW sorted the contents of a ZIP-file !`^gosub Messagebox^goto Mainchoices^endiff
  126.    iff "%Mainchoice" eq "4" then^set Message=`Use this for REPAIR, TEST, MAKE-SFX, PRINT and much more ! `^gosub Messagebox^goto Mainchoices^endiff
  127.    iff "%Mainchoice" eq "5" then^set Message=`Use this option to alter the default CONFIGURATION settings`^gosub Messagebox^goto Mainchoices^endiff
  128.    iff "%Mainchoice" eq "6" then^set Message=`Use this option to quit with 4DOS-archiver 4ZIP version 3.1`^gosub Messagebox^goto Mainchoices^endiff
  129.  
  130. :Help
  131.    do Line = 03 to 05
  132.      # %Line 21 blu on bri blu %@repeat[%@char[255],52]
  133.    enddo
  134.    drawbox 02 10 05 72 02 bla on bri yel shadow
  135.    # 03 11 blu on bri yel %@repeat[%@char[255],61]
  136.    # 04 11 blu on bri yel %@repeat[%@char[255],61]
  137.    # 03 12 blu on bri yel %Line1
  138.    # 04 12 blu on bri yel %Line2
  139.    Pause >& nul^gosub Topscreen^return
  140.  
  141. :Floppy
  142.    drawbox 03 21 05 58 02 bla on bri yel shadow
  143.    # 04 22 blu on bri yel %@repeat[%@char[255],36]
  144.    # 04 23 blu on bri yel Load disk in drive %@upper[%_Floppy] and hit a key^pause >& nul
  145.    iff %@ready[%_Floppy] ne 1 then^goto Floppy^else^gosub Topscreen^endiff^return
  146.  
  147. :Messagebox
  148.    beep
  149.    do Line = 03 to 05
  150.      # %Line 21 blu on bri blu %@repeat[%@char[255],52]
  151.    enddo
  152.    drawbox 03 10 05 72 02 bla on bri yel shadow
  153.    # 04 11 blu on bri yel %@repeat[%@char[255],61]
  154.    # 04 12 blu on bri yel %Message
  155.    delay 3^set Message=`Wrong inputvalues or combination of values is not allowed !`
  156.    gosub Topscreen^return
  157.  
  158. :Stop
  159.    cls blu on blu border bla^drawbox 08 16 10 64 2 bla on bri red shadow zoom
  160.    # 09 17 bri yel on bri red ` Thanks for trying 4DOS archive utility 4ZIP ! `^snd
  161.    drawbox 14 16 19 64 1 bla on bri whi fill whi shadow^keystack !
  162.    do Line = 15 to 18
  163.      # %Line 17 blu on bri whi %@repeat[%@char[255],47]
  164.    enddo
  165.    # 15 17 blu on bri whi ` Unregistered evaluation-copy:                 `^delay^keystack !^beep 300 4^keystack !
  166.    # 16 17 blu on bri whi ` ──── Register now and fill in the orderform! `^delay^keystack !^beep 300 4^keystack !
  167.    # 17 17 blu on bri whi ` ──── Print out ORDER.FRM for order 4ZIP.BTM! `^delay^keystack !^beep 300 4^keystack !
  168.    # 18 17 blu on bri whi ` ──── Free upgrades and support by mail       `^delay^keystack !^beep 300 4^keystack !
  169.    # 23 16 bri whi on blu `Hit a key to return to DOS . . .               `^keystack !^Pause >& nul^keystack !
  170.    cls %Origcolor^setdos /s15:100^cancel
  171.  
  172. :Background1
  173.    do Line = 0 to 6
  174.     # %Line 0 Bla on Bri Blu %@repeat[%@char[176],81]
  175.    enddo
  176.    return
  177.  
  178. :Background2
  179.    do Line = 7 to 24
  180.     # %Line 0 Bla on Bri Blu %@repeat[%@char[176],81]
  181.    enddo
  182.    return
  183.  
  184. :Topscreen
  185.    gosub Background1^drawbox 03 21 05 58 02 bla on bri red fill red sha zoo
  186.    # 04 22 blu on bri red ` 4DOS archiver for ZIP version 3.10 `^return
  187.  
  188. :Mainscreen
  189.    setdos /s0:0^cls bla on bla border bla^gosub Topscreen^gosub Background2
  190.    on Break goto Mainscreen^if %_Ansi eq 1 color bla on bri red ^ unset /q Jump
  191.    drawbox 08 21 21 58 02 bla on bri red shadow
  192.    do Line = 09 to 20
  193.     # %Line 22 bri yel on bri red %@repeat[%@char[255],36]
  194.    enddo
  195.  
  196.    # 09 27 bla on bri red `******* Main menu *******`
  197.    # 11 27 bri yel on bri red `1 - Archive files`
  198.    # 12 27 bri yel on bri red `2 - Extract files`
  199.    # 13 27 bri yel on bri red `3 - List contents ZIP-files`
  200.    # 14 27 bri yel on bri red `4 - Maintainance ZIP-files`
  201.    # 15 27 bri yel on bri red `5 - Setup configuration`
  202.    # 16 27 bri yel on bri red `6 - Exit`
  203.    # 18 31 bla on bri red `F1 = General Help`
  204.    if exist %@search[4ziphelp.com] # 19 31 bla on bri red `F7 = Main Help`
  205.  
  206. :Mainchoices
  207.    setdos /s0:0^inkey /c /p /k"123456[F1][ESC][F7]" %%Mainchoice
  208.    if "%Mainchoice" eq "@59" (setdos /s15:100^goto Mainhelp)
  209.    if "%Mainchoice" eq "1" (setdos /s15:100^goto Screen1)
  210.    if "%Mainchoice" eq "2" (setdos /s15:100^goto Screen2)
  211.    if "%Mainchoice" eq "3" (setdos /s15:100^goto Screen3)
  212.    if "%Mainchoice" eq "4" (setdos /s15:100^goto Screen4)
  213.    if "%Mainchoice" eq "5" (setdos /s15:100^goto Screen5)
  214.    if "%Mainchoice" eq "6" (setdos /s15:100^goto Stop)
  215.    iff "%Mainchoice" eq "@65" .and. exist %@search[4ziphelp.com] then
  216.    %@search[4ziphelp.com]^goto Mainscreen^else^goto Stop^endiff
  217.  
  218. :Screen1
  219.    cls bla on bla border bla^gosub Topscreen^gosub Background2
  220.    if %_Ansi eq 1 color bla on bri red
  221.    drawbox 08 10 22 72 02 bla on bri red shadow
  222.    # 22 12 blu on bri red ` Ctrl-Break = Mainscreen `
  223.    do Line = 09 to 21
  224.     # %Line 11 bri yel on bri red %@repeat[%@char[255],61]
  225.    enddo
  226.  
  227.    # 08 21 bla on bri red ` Create an archived ZIP file from disk(s) `
  228.    # 10 13 bri yel on bri red `Path & name file(s) :`
  229.    # 11 13 bri yel on bri red `Path & name ZIP-file:`
  230.    # 12 13 bri yel on bri red `Use 4dos select-command ?   (Y/N):`
  231.    # 13 13 bri yel on bri red `Create a SFX (.EXE) file    (Y/N):`
  232.    # 14 13 bri yel on bri red `Recurse subdirectories      (Y/N):`
  233.    # 15 13 bri yel on bri red `Add, move or update files (A/M/U):`
  234.    # 16 13 bri yel on bri red `Enable Multiple Volumes     (Y/N):`
  235.    # 17 13 bri yel on bri red `Store full path in archive  (Y/N):`
  236.    # 18 13 bri yel on bri red `Test CRC after archiving    (Y/N):`
  237.    # 19 13 bri yel on bri red `Give if needed optional password :`
  238.    # 20 13 bri yel on bri red `Start with Archiving      (Y/N/Q):`
  239.  
  240.    :Line1A
  241.    # 22 58 bla on bri red %@repeat[%@char[205],11]^screen 10 35^input /c /E /L37 %%Archivepath
  242.    iff %@removable[%@instr[0,2,%Archivepath]] eq 1 .and. %@ready[%@instr[0,2,%Archivepath]] ne 1 then^set _Floppy=%@instr[0,2,%Archivepath]^gosub Floppy^endiff
  243.    iff "%Archivepath" eq ""  then^set Archivepath=%@upper[%[_cwds]*.*]^# 10 35 bla on bri red %Archivepath
  244.    elseiff not isdir %@path[%Archivepath] then^set Message=`Path %@upper[%@path[%Archivepath]] does not exist, please correct path !`
  245.    gosub Messagebox^goto Line1A^endiff^# 10 35 bla on bri red %Archivepath
  246.  
  247.    :Line2A
  248.    screen 11 35^input /c /E /L37 %%Targetpath
  249.    iff %@removable[%@instr[0,2,%Targetpath]] eq 1 .and. %@ready[%@instr[0,2,%Targetpath]] ne 1 then^set _Floppy=%@instr[0,2,%Targetpath]^gosub Floppy^endiff
  250.    iff "%Targetpath" eq ""  then^set Targetpath=%@upper[%[_cwds]archive.zip]^# 11 35 bla on bri red %Targetpath
  251.    elseiff not isdir %@path[%Targetpath] then^set Message=`Path %@upper[%@path[%Targetpath]] does not exist, please correct path !`
  252.    gosub Messagebox^goto Line2A^endiff
  253.    iff "%@instr[0,-1,%Targetpath]" eq "\" then^set Message=`You must complete this path with a valid archive-name`
  254.    gosub Messagebox^goto Line2A^endiff^iff "%@instr[2,-3,%Targetpath]" eq "exe" .and. %AV eq Y then
  255.    set Line1=`You have set Authenticity Verification on, therefor it is  `^set Line2=`not possible to make an .EXE file. Hit a key to continue...`
  256.    gosub Help^goto Line2A^endiff^# 11 35 bla on bri red %Targetpath
  257.  
  258.    :Line3A
  259.    # 22 58 bri yel on bri red ` F1 = Help `^# 12 48 bla on bri red N
  260.    screen 12 48^inkey /c %%Select^check %Select^iff "%Select" eq "@72" then^# 12 48 bla on bri red `   `
  261.    # 11 35 bla on bri red %@repeat[%@char[255],37]^goto Line1A^endiff
  262.    iff "%Select" eq "@28" .or. "%Select" eq "N" .or. "%Select" eq "@80" then^set Select=N^# 12 48 bla on bri red No^goto Line4A^endiff
  263.    iff "%Select" eq "Y" then^# 12 48 bla on bri red Yes^goto Line4A^elseiff "%Select" eq "@59" then
  264.    set Line1=`You can use a "point & shoot" select screen for selecting  `^set Line2=`the files to be archived. Hit a key to continue...         `
  265.    gosub Help^goto Line3A^else^gosub Messagebox^goto Line3A^endiff
  266.  
  267.    :Line4A
  268.    iff "%@instr[2,-3,%Targetpath]" eq "exe" then^# 13 48 bla on bri red Yes^set Sfx=Y^goto Line5A^endiff
  269.    # 13 48 bla on bri red N^screen 13 48^set Jump=Y^inkey /c %%Sfx^check %Sfx
  270.    iff "%Sfx" eq "@72" then^# 13 48 bla on bri red `   `^# 12 48 bla on bri red `   `
  271.    goto Line3A^endiff
  272.    iff "%Sfx" eq "@28" .or. "%Sfx" eq "@80" .or. "%Sfx" eq "N" then^set Sfx=N^# 13 48 bla on bri red No^goto Line5A^endiff
  273.    iff "%Sfx" eq "Y" .and. "%AV" eq "Y" then^set Message=`Authenticity Verification-usage is on, SFX-files not allowed`
  274.    gosub Messagebox^set %Sfx=N^scrput 13 48 bla on bri red No^goto Line5A^endiff
  275.    iff "%Sfx" eq "Y" then^# 13 48 bla on bri red Yes^goto Line5A^elseiff "%Sfx" eq "@59" then
  276.    set Line1=`You can make an archive self-extractable, e.g. the archive `^set Line2=`will be a stand-alone .EXE file ! Hit a key to continue ...`
  277.    gosub Help^goto Line4A^else^gosub Messagebox^goto Line4A^endiff
  278.  
  279.    :Line5A
  280.    iff %Select eq Y then^# 14 48 bla on bri red N^unset /q Jump^set Subdir=N^goto Line6A^endiff
  281.    # 14 48 bla on bri red N^screen 14 48^inkey /c %%Subdir^check %Subdir
  282.    iff "%Subdir" eq "@72" .and. "%Jump" eq "Y" then^# 14 48 bla on bri red `   `^# 13 48 bla on bri red `   `
  283.    unset Jump^goto Line4A^elseiff "%Subdir" eq "@72" .and. "%Jump" eq "" then^# 14 48 bla on bri red `   `
  284.    # 13 48 bla on bri red `   `^# 12 48 bla on bri red `   `^goto Line3A^endiff
  285.    iff "%Subdir" eq "@28" .or. "%Subdir" eq "N" .or. "%Subdir" eq "@80" then^unset /q Jump^set Subdir=N
  286.    # 14 48 bla on bri red No^goto Line6A^endiff
  287.    iff "%Subdir" eq "Y" then^# 14 48 bla on bri red Yes^goto Line6A^elseiff "%Subdir" eq "@59" then
  288.    set Line1=`Selecting this option causes files within subdirectories of`^set Line2=`the chosen path to be included !  Hit a key to continue ...`
  289.    gosub Help^goto Line5A^else^gosub Messagebox^goto Line5A^endiff
  290.  
  291.    :Line6A
  292.    # 15 48 bla on bri red A^screen 15 48^inkey /c %%Command^check %Command
  293.    iff "%Command" eq "@72" .and. %Select eq Y .and. "%@instr[2,-3,%Targetpath]" ne "exe" then^# 15 48 bla on bri red `    `
  294.    # 14 48 bla on bri red `   `^# 13 48 bla on bri red `   `^goto Line4A^endiff
  295.    iff "%Command" eq "@72" .and. %Select eq Y .and. "%@instr[2,-3,%Targetpath]" eq "exe" then^# 15 48 bla on bri red `    `
  296.    # 14 48 bla on bri red `   `^# 13 48 bla on bri red `   `^# 12 48 bla on bri red `   `^goto Line3A
  297.    elseiff "%Command" eq "@72" .and. %Select eq N then^# 15 48 bla on bri red `   `^# 14 48 bla on bri red `   `^goto Line5A^endiff
  298.    iff "%Command" eq "@28" .or. "%Command" eq "@80" .or. "%Command" eq "A" then^set Command=-a^# 15 48 bla on bri red Add^goto Line7A^endiff
  299.    iff "%Command" eq "M" then^set command=-m-^# 15 48 bla on bri red Move^goto Line7A^elseiff "%Command" eq "U" .and. not exist %Targetpath then
  300.    set Message=`Targetfile %@upper[%@filename[%Targetpath]] does not exist, UPDATE is not allowed`^gosub Messagebox^goto Line6A^endiff
  301.    iff "%Command" eq "U" then^set command=-u^# 15 48 bla on bri red Update^goto Line7A^elseiff "%Command" eq "@59" then
  302.    set Line1=`Choose ADD to create. MOVE to copy and delete files and    `^set Line2=`UPDATE to update files in a ZIP-file. Hit a key to continue`
  303.    gosub Help^goto Line6A^else^gosub Messagebox^goto Line6A^endiff
  304.  
  305.    :Line7A
  306.    iff %@removable[%@instr[0,2,%Targetpath]] eq 1 .and. "%Sfx" eq "Y" then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
  307.    iff %@removable[%@instr[0,2,%Targetpath]] ne 1 then^# 16 48 bla on bri red No^set Volumes=N^unset /q Jump^goto Line8A^endiff
  308.    # 16 48 bla on bri red N^screen 16 48^set Jump=Y^inkey /c %%Volumes^check %Volumes
  309.    iff "%Volumes" eq "@72" then^# 16 48 bla on bri red `   `^# 15 48 bla on bri red `    `^unset /q Jump^goto Line6A^elseiff "%Volumes" eq "@80" then^set Volumes=N^endiff
  310.    iff "%Volumes" eq "@28" .or. "%Volumes" eq "N" then^set Volumes=N^# 16 48 bla on bri red No^goto Line8A^endiff
  311.    iff "%Volumes" eq "Y" then^# 16 48 bla on bri red Yes^goto Line8A^elseiff "%Volumes" eq "@59" then
  312.    set Line1=`This option is to create & split an archive into multiple  `^set Line2=`floppy-disks(for backup purposes) Hit a key to continue ...`
  313.    gosub Help^goto Line7A^else^gosub Messagebox^goto Line7A^endiff
  314.  
  315.    :Line8A
  316.    # 17 48 bla on bri red N^screen 17 48^inkey /c %%Store^check %Store
  317.    iff "%Store" eq "@72" .and. "%Jump" eq "Y" then^# 17 48 bla on bri red `   `^# 16 48 bla on bri red `   `^goto Line7A
  318.    elseiff "%Store" eq "@72" .and. "%Jump" eq "" then^# 17 48 bla on bri red `   `^# 16 48 bla on bri red `   `
  319.    # 15 48 bla on bri red `    `^goto Line6A^endiff^iff "%Store" eq "@28" .or. "%Store" eq "N" .or. "%Store" eq "@80" then^set Store=N
  320.    unset /q Jump^# 17 48 bla on bri red No^goto Line9A^endiff^iff "%Store" eq "Y" then^# 17 48 bla on bri red Yes^goto Line9A^elseiff "%Store" eq "@59" then
  321.    set Line1=`You can store the whole path within an archive, so that is `^set Line2=`possible to restore the same path. Hit a key to continue...`
  322.    gosub Help^goto Line8A^else^gosub Messagebox^goto Line8A^endiff
  323.  
  324.    :Line9A
  325.    # 18 48 bla on bri red Y^screen 18 48^inkey /c %%Test^check %Test
  326.    iff "%Test" eq "@72" then^# 18 48 bla on bri red `   `^# 17 48 bla on bri red `    `^goto Line8A^elseiff "%Test" eq "@80" then^set Test=Y^endiff
  327.    iff "%Test" eq "@28" .or. "%Test" eq "Y" then^set Test=Y^# 18 48 bla on bri red Yes^goto Line10A^endiff
  328.    iff "%Test" eq "N" then^# 18 48 bla on bri red No^goto Line10A^elseiff "%Test" eq "@59" then
  329.    set Line1=`This causes 4ZIP to do test on CRC during archiving, this  `^set Line2=`is not possible if you use multiple volumes. Hit a key.... `
  330.    gosub Help^goto Line9A^else^gosub Messagebox^goto Line9A^endiff
  331.  
  332.    :Line10A
  333.    # 22 58 bla on bri red %@repeat[%@char[205],11]^screen 19 48^unset /q Psd^input /c /L17 /P %%Psd
  334.    iff "%Psd" eq "" then^# 19 48 bla on bri red ` [No password] `^else^# 19 48 bla on bri red ` [Password hidden] `^endiff
  335.  
  336.    :Line11A
  337.    # 22 58 bri yel on bri red ` F1 = Help `^# 20 48 bla on bri red Y^screen 20 48^inkey /c %%Start^check %Start
  338.    iff "%Start" eq "@72" then^# 20 48 bla on bri red `   `^# 19 48 bla on bri red %@repeat[%@char[255],24]
  339.    # 18 48 bla on bri red `   `^ goto Line9A^endiff
  340.    iff "%Start" eq "@28" .or. "%Start" eq "Y" then^set Start=Y^goto Archive^endiff
  341.    iff "%Start" eq "N" then^# 20 48 bla on bri red No^goto Screen1^elseiff "%Start" eq "Q" then^goto Mainscreen^endiff
  342.    iff "%Start" eq "@59" then^set Line1=`YES starts the program, NO returns to the beginning of this`
  343.    set Line2=`screen. Quit invokes the Mainscreen. Hit a key to continue.`^gosub Help^goto Line11A^else^gosub Messagebox^goto Line11A^endiff
  344.  
  345. :Screen2
  346.    cls bla on bla border bla^gosub Topscreen^gosub Background2^set Extractfile=*.*
  347.    if %_Ansi eq 1 color bla on bri red
  348.    drawbox 08 10 20 72 02 bla on bri red shadow
  349.    # 20 12 blu on bri red ` Ctrl-Break = Mainscreen `
  350.    do Line = 09 to 19
  351.     # %Line 11 bri yel on bri red %@repeat[%@char[255],61]
  352.    enddo
  353.  
  354.    # 08 20 bla on bri red ` Extracting an archived ZIP file to disk `
  355.    # 10 13 bri yel on bri red `Path & name ZIP-file :`
  356.    # 11 13 bri yel on bri red `Path target directory:`
  357.    # 12 13 bri yel on bri red `Filenames or wildcards to exclude  :`
  358.    # 13 13 bri yel on bri red `Extract specified directory/file   :`
  359.    # 14 13 bri yel on bri red `Overwrite existing files      (Y/N):`
  360.    # 15 13 bri yel on bri red `Extract with full path        (Y/N):`
  361.    # 16 13 bri yel on bri red `Test CRC before extracting    (Y/N):`
  362.    # 17 13 bri yel on bri red `Give if required optional password :`
  363.    # 18 13 bri yel on bri red `Start with extracting       (Y/N/Q):`
  364.  
  365.    :Line1B
  366.    # 20 58 bla on bri red %@repeat[%@char[205],11]
  367.    screen 10 36^input /c /E /L36 %%Sourcepath
  368.    iff %@removable[%@instr[0,2,%Sourcepath]] eq 1 .and. %@ready[%@instr[0,2,%Sourcepath]] ne 1 then^set _Floppy=%@instr[0,2,%Sourcepath]^gosub Floppy^endiff
  369.    iff not isdir %@path[%Sourcepath] then^set Message=`Path %@upper[%@path[%Sourcepath]] does not exist, please correct path !`
  370.    gosub Messagebox^goto Line1B^endiff
  371.    iff not exist %Sourcepath then^set Message=`File %@upper[%@filename[%Sourcepath]] does not exist, please correct name !`
  372.    gosub Messagebox^goto Line1B^endiff^# 10 36 bla on bri red %Sourcepath
  373.  
  374.    :Line2B
  375.    screen 11 36^input /c /E /L35 %%Extractpath
  376.    iff %@removable[%@instr[0,2,%Extractpath]] eq 1 .and. %@ready[%@instr[0,2,%Extractpath]] ne 1 then^set _Floppy=%@instr[0,2,%Extractpath]^gosub Floppy^endiff
  377.    iff "%Extractpath" eq ""  then^set Extractpath=%@upper[%[_cwds]]^# 11 36 bla on bri red %Extractpath^endiff
  378.    iff %@instr[%@len[%Extractpath],1,"%Extractpath"] ne \ then^set Extractpath=%Extractpath\^endiff
  379.    # 11 36 bla on bri red %Extractpath
  380.  
  381.    :Line3B
  382.    # 20 58 bla on bri red %@repeat[%@char[205],11]^screen 12 50^input /c /l12 %%Skip_A
  383.    iff "%Skip_A" eq "" then^# 12 50 bla on bri red `No files to exclude`^goto Line4B^endiff
  384.    # 12 13 bri yel on bri red %@repeat[%@char[255],59]^# 12 13 bri yel on bri red Other File(spec) to be excluded    :
  385.    screen 12 50^input /c /l12 %%Skip_B^iff "%Skip_B" eq "" then^# 12 50 bla on bri red `No further exclusions`^goto Line4B^endiff
  386.    # 12 13 bri yel on bri red %@repeat[%@char[255],59]^# 12 13 bri yel on bri red Last file(spec) to be excluded     :
  387.    screen 12 50^input /c /l12 %%Skip_C^iff "%Skip_C" eq "" then^# 12 50 bla on bri red `No further exclusions`
  388.    else^# 12 50 bla on bri red %Skip_C^goto Line4B^endiff
  389.  
  390.    :Line4B
  391.    screen 13 50^input /c /L12 /E %%Extractfile
  392.    iff "%Extractfile" eq "" then^set Extractfile=*.*^endiff^# 13 50 bla on bri red %Extractfile
  393.  
  394.    :Line5B
  395.    # 20 58 bri yel on bri red ` F1 = Help `
  396.    # 14 50 bla on bri red Y^screen 14 50^inkey /c %%Over^check %Over
  397.    iff "%Over" eq "@72" then^# 14 50 bla on bri red `   `^# 13 50 bla on bri red %@repeat[%@char[255],22]^# 12 50 bla on bri red %@repeat[%@char[255],22]
  398.    # 12 13 bri yel on bri red `Filenames or wildcards to exclude  :`^unset /q Skip_A Skip_B Skip_C
  399.    # 11 36 bla on bri red %@repeat[%@char[255],36]^goto Line1B^endiff^if "%Over" eq "@80" set Over=Y
  400.    iff "%Over" eq "@28" .or. "%Over" eq "Y" then^set Over=Y^# 14 50 bla on bri red Yes^goto Line6B^endiff
  401.    iff "%Over" eq "N" then^# 14 50 bla on bri red No^goto Line6B^elseiff "%Over" eq "@59" then
  402.    set Line1=`To be sure you do not overwrite existing files on your disk`^set Line2=`set this option to NO. Hit a key to continue               `
  403.    gosub Help^goto Line5B^else^gosub Messagebox^goto Line5B^endiff
  404.  
  405.    :Line6B
  406.    # 15 50 bla on bri red N^screen 15 50^inkey /c %%Subdir^check %Subdir
  407.    iff "%Subdir" eq "@72" then^# 15 50 bla on bri red `   `^# 14 50 bla on bri red `   `
  408.    goto Line5B^elseiff "%Subdir" eq "@80" then^set Subdir=N^endiff
  409.    iff "%Subdir" eq "@28" .or. "%Subdir" eq "N" then^set Subdir=N^# 15 50 bla on bri red No^goto Line7B^endiff
  410.    iff "%Subdir" eq "Y" then^# 15 50 bla on bri red Yes^goto Line7B^elseiff "%Subdir" eq "@59" then
  411.    set Line1=`If the path was stored during archive, you can rebuild it  `^set Line2=`starting from the choosen directory. Hit a key to continue.`
  412.    gosub Help^goto Line6B^else^gosub Messagebox^goto Line6B^endiff
  413.  
  414.    :Line7B
  415.    # 20 58 bri yel on bri red ` F1 = Help `
  416.    # 16 50 bla on bri red Y^screen 16 50^inkey /c %%Test^check %Test
  417.    iff "%Test" eq "@72" then^# 16 50 bla on bri red `   `^# 15 50 bla on bri red `   `
  418.    goto Line6B^endiff^if "%Test" eq "@80" set Test=Y
  419.    iff "%Test" eq "@28" .or. "%Test" eq "Y" then^set Test=Y^# 16 50 bla on bri red Yes^goto Line8B^endiff
  420.    iff "%Test" eq "N" then^# 16 50 bla on bri red No^goto Line8B^elseiff "%Test" eq "@59" then
  421.    set Line1=`To be sure you unpack the ZIP-archive properly, set this   `^set Line2=`option to YES for checking the CRC. Hit a key to continue. `
  422.    gosub Help^goto Line7B^else^gosub Messagebox^goto Line7B^endiff
  423.  
  424.    :Line8B
  425.    # 20 58 bla on bri red %@repeat[%@char[205],11]^screen 17 50^unset /q Psd^input /c /L17 /P %%Psd
  426.    iff "%Psd" eq "" then^# 17 50 bla on bri red ` [No password] `^else^# 17 50 bla on bri red ` [Password hidden] `^endiff
  427.  
  428.    :Line9B
  429.    # 20 58 bri yel on bri red ` F1 = Help `
  430.    # 18 50 bla on bri red Y^screen 18 50^inkey /c %%Start^check %Start
  431.    iff "%Start" eq "@72" then^# 18 50 bla on bri red `   `^# 17 50 bla on bri red %@repeat[%@char[255],19]
  432.    # 16 50 bla on bri red `   `^ goto Line7B^endiff
  433.    iff "%Start" eq "@28" .or. "%Start" eq "Y" then^set Start=Y^goto Extract^endiff
  434.    iff "%Start" eq "N" then^# 18 50 bla on bri red No^goto Screen2^elseiff "%Start" eq "Q" then^goto Mainscreen^endiff
  435.    iff "%Start" eq "@59" then^set Line1=`YES starts the program, NO returns to the beginning of this`
  436.    set Line2=`screen. Quit invokes the Mainscreen. Hit a key to continue.`^gosub Help^goto Line9B^else^gosub Messagebox^goto Line9B^endiff
  437.  
  438. :Screen3
  439.    cls bla on bla border bla^gosub Topscreen^gosub Background2
  440.    if %_Ansi eq 1 color bla on bri red
  441.    drawbox 08 10 20 72 02 bla on bri red shadow
  442.    # 20 12 blu on bri red ` Ctrl-Break = Mainscreen `
  443.    do Line = 09 to 19
  444.     # %Line 11 bri yel on bri red %@repeat[%@char[255],61]
  445.    enddo
  446.  
  447.    # 08 23 bla on bri red ` View sorted a ZIP file using LIST `
  448.    # 10 13 bri yel on bri red `Path & name ZIP-file:`
  449.    # 11 13 bri yel on bri red `View sorted on Name or CRC  (N/C):`
  450.    # 12 13 bri yel on bri red `View sorted on Date or Size (D/S):`
  451.    # 13 13 bri yel on bri red `View sorted on Ext. or Ratio(E/R):`
  452.    # 14 13 bri yel on bri red `View as stored in ZIP-file  (Y/N):`
  453.    # 15 13 bri yel on bri red `Reverse the sort-order      (Y/N):`
  454.    # 18 13 bri yel on bri red `Start with viewing        (Y/N/Q):`
  455.  
  456.    :Line1C
  457.    screen 10 35^input /c /E /L37 %%Sourcepath
  458.    iff %@removable[%@instr[0,2,%Sourcepath]] eq 1 .and. %@ready[%@instr[0,2,%Sourcepath]] ne 1 then^set _Floppy=%@instr[0,2,%Sourcepath]^gosub Floppy^endiff
  459.    iff not isdir %@path[%Sourcepath] then^set Message=`Path %@upper[%@path[%Sourcepath]] does not exist, please correct path !`
  460.    gosub Messagebox^goto Line1C^endiff
  461.    iff not exist %Sourcepath then^set Message=`File %@upper[%@filename[%Sourcepath]] does not exist, please correct name !`
  462.    gosub Messagebox^goto Line1C^endiff
  463.    # 10 35 bla on bri red %Sourcepath
  464.  
  465.    :Line2C
  466.    # 20 58 bri yel on bri red ` F1 = Help `^screen 11 48^inkey /c %%Sort^check %Sort
  467.    iff "%Sort" eq "@72" then^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line1C^endiff
  468.    iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort^ # 11 48 bla on bri red Not selected^goto Line3C^endiff
  469.    iff "%Sort" eq "N" then^set Sort=-vn^# 11 48 bla on bri red Filename sort^goto Line6C^endiff
  470.    iff "%Sort" eq "C" then^set Sort=-vc^# 11 48 bla on bri red CRC sort^goto Line6C^endiff
  471.    iff "%Sort" eq "@59" then^set Line1=`For sorting on Filename or CRC choose the valid option or  `
  472.    set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
  473.    gosub Help^goto Line2C^else^set Message=`Please answer with N(ame) or C(RC), %@upper[%Sort] is not allowed`
  474.    gosub Messagebox^goto Line2C^endiff
  475.  
  476.    :Line3C
  477.    screen 12 48^inkey /c %%Sort^check %Sort
  478.    iff "%Sort" eq "@72" then^# 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line2C^endiff
  479.    iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort^ # 12 48 bla on bri red Not selected^goto Line4C^endiff
  480.    iff "%Sort" eq "D" then^set Sort=-vd^# 12 48 bla on bri red Date sort^goto Line6C^endiff
  481.    iff "%Sort" eq "S" then^set Sort=-vs^# 12 48 bla on bri red Size sort^goto Line6C^endiff
  482.    iff "%Sort" eq "@59" then^set Line1=`For sorting on Filedate or size choose a valid option or   `
  483.    set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
  484.    gosub Help^goto Line3C^else^set Message=`Please answer with D(ate) or S(ize), %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line3C^endiff
  485.  
  486.    :Line4C
  487.    screen 13 48^inkey /c %%Sort^check %Sort
  488.    iff "%Sort" eq "@72" then^# 13 48 bla on bri red %@repeat[%@char[255],24]^# 12 48 bla on bri red %@repeat[%@char[255],24]
  489.    # 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line3C^endiff
  490.    iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^unset Sort ^# 13 48 bla on bri red Not selected^goto Line5C^endiff
  491.    iff "%Sort" eq "E" then^set Sort=-ve^# 13 48 bla on bri red Extension sort^goto Line6C^endiff
  492.    iff "%Sort" eq "R" then^set Sort=-vp^# 13 48 bla on bri red Ratio sort^goto Line6C^endiff
  493.    iff "%Sort" eq "@59" then^set Line1=`For sorting on Extension or Ratio choose a valid option or `
  494.    set Line2=`press [ENTER] to skip these options. Hit a key to continue.`
  495.    gosub Help^goto Line4C^else^set Message=`Please answer with E(xtension) or R(atio), %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line4C^endiff
  496.  
  497.    :Line5C
  498.    screen 14 48^inkey /c %%Sort^check %Sort
  499.    iff "%Sort" eq "@72" then^# 14 48 bla on bri red %@repeat[%@char[255],24]^# 13 48 bla on bri red %@repeat[%@char[255],24]
  500.    # 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]^goto Line4C^endiff
  501.    iff "%Sort" eq "N" then^set Message=`*** No sort-options selected, mainmenu will be reopend ***`^gosub Messagebox^goto Mainscreen^endiff
  502.    iff "%Sort" eq "@28" .or. "%Sort" eq "@80" then^set Sort=Y^endiff
  503.    iff "%Sort" eq "Y" then^set Sort=-vn^ # 14 48 bla on bri red Natural Order^goto Line6C^endiff
  504.    iff "%Sort" eq "@59" then^set Line1=`If you want to view without sorting choose YES or press    `
  505.    set Line2=`[ENTER] to skip these options. Hit a key to continue.      `
  506.    gosub Help^goto Line5C^else^set Message=`Please answer Y(es) or N(o) as options %@upper[%Sort] is not allowed`^gosub Messagebox^goto Line5C^endiff
  507.  
  508.    :Line6C
  509.    # 15 48 bla on bri red N^screen 15 48^inkey /c %%Reverse^check %Reverse
  510.    iff "%Reverse" eq "@72" then^# 15 48 bla on bri red %@repeat[%@char[255],24]^# 14 48 bla on bri red %@repeat[%@char[255],24]
  511.    # 13 48 bla on bri red %@repeat[%@char[255],24]^# 12 48 bla on bri red %@repeat[%@char[255],24]^# 11 48 bla on bri red %@repeat[%@char[255],24]
  512.    goto Line5C^elseiff "%Reverse" eq "@80" then^set Reverse=N^endiff
  513.    iff "%Reverse" eq "@28" .or. "%Reverse" eq "N" then^unset Reverse^# 15 48 bla on bri red No reversed sortorder^goto Line7C^endiff
  514.    iff "%Reverse" eq "Y" then^set Sort=%Sort%r^# 15 48 bla on bri red Sorting will be reversed^goto Line7C^endiff
  515.    iff "%Reverse" eq "@59" then^set Line1=`If you want all sorting to be done reversed you must choose`^set Line2=`YES. Answer NO will not reverse ! Hit a key to continue... `
  516.    gosub Help^goto Line6C^else^set Message=`Answer with Y(es) or N(o) , anything else is not allowed`^gosub Messagebox^goto Line6C^endiff
  517.  
  518.    :Line7C
  519.    # 18 48 bla on bri red Y^screen 18 48^inkey /c %%Start^check %Start
  520.    iff "%Start" eq "@72" then^# 18 48 bla on bri red `   `^# 15 48 bla on bri red %@repeat[%@char[255],24]^ goto Line6C^endiff
  521.    iff "%Start" eq "@28" .or. "%Start" eq "Y" then^set Start=Y^goto Sort^endiff
  522.    iff "%Start" eq "N" then^# 18 48 bla on bri red No^goto Screen3^elseiff "%Start" eq "Q" then^goto Mainscreen^endiff
  523.    iff "%Start" eq "@59" then^set Line1=`YES starts the program, NO returns to the beginning of this`
  524.    set Line2=`screen. Quit invokes the Mainscreen. Hit a key to continue.`^gosub Help^goto Line7C^else^gosub Messagebox^goto Line7C^endiff
  525.  
  526. :Screen4
  527.    cls bla on bla border bla^gosub Topscreen^gosub Background2^unset /q File
  528.    if %_Ansi eq 1 color bla on bri red
  529.    drawbox 08 10 20 72 02 bla on bri red shadow
  530.    # 20 12 blu on bri red ` Ctrl-Break = Mainscreen `
  531.    do Line = 09 to 19
  532.     # %Line 11 bri yel on bri red %@repeat[%@char[255],61]
  533.    enddo
  534.  
  535.    # 08 28 bla on bri red ` Maintainance ZIP-archives `
  536.    # 10 13 bri yel on bri red `Path & name ZIP-file:`
  537.    # 11 13 bri yel on bri red `Test integrity ZIP-file   (Y/N):`
  538.    # 12 13 bri yel on bri red `List with technical info  (Y/N):`
  539.    # 13 13 bri yel on bri red `Change .ZIP to .EXE file  (Y/N):`
  540.    # 14 13 bri yel on bri red `Extract file to screen    (Y/N):`
  541.    # 15 13 bri yel on bri red `Repair using PKZIPFIX     (Y/N):`
  542.    # 16 13 bri yel on bri red `Erase file within ZIPfile (Y/N):`
  543.    # 17 13 bri yel on bri red `Give optional Password         :`
  544.    # 18 13 bri yel on bri red `Start program           (Y/N/Q):`
  545.    goto Line1D
  546.  
  547.    :Empty
  548.     do Line = 11 to 18
  549.     # %Line 46 bri yel on bri red %@repeat[%@char[255],26]
  550.     enddo
  551.     # 14 13 bri yel on bri red `Extract file to screen    (Y/N):`
  552.     # 16 13 bri yel on bri red `Erase file within ZIPfile (Y/N):`
  553.     unset /q Test View Change Extract Repair Erase
  554.     return
  555.  
  556.    :Line1D
  557.    screen 10 35^input /c /E /L37 %%Sourcepath
  558.    iff %@removable[%@instr[0,2,%Sourcepath]] eq 1 .and. %@ready[%@instr[0,2,%Sourcepath]] ne 1 then^set _Floppy=%@instr[0,2,%Sourcepath]^gosub Floppy^endiff
  559.    iff not isdir %@path[%Sourcepath] then^set Message=`Path %@upper[%@path[%Sourcepath]] does not exist, please correct path !`
  560.    gosub Messagebox^goto Line1D^endiff
  561.    iff not exist %Sourcepath then^set Message=`File %@upper[%@filename[%Sourcepath]] does not exist, please correct name !`
  562.    gosub Messagebox^goto Line1D^endiff
  563.    # 10 35 bla on bri red %Sourcepath
  564.  
  565.    :Line2D
  566.    # 20 58 bri yel on bri red ` F1 = Help `^ # 11 46 bla on bri red N^screen 11 46^inkey /c %%Test
  567.    iff "%Test" eq "@72" then^gosub Empty^goto Line1D^elseiff "%Test" eq "@80" then^set Test=N^endiff
  568.    iff "%Test" eq "@28" .or. "%Test" eq "N" then^set Test=N^# 11 46 bla on bri red No^goto Line3D^endiff
  569.    iff "%Test" eq "Y" then^# 11 46 bla on bri red Yes^goto Line8D^elseiff "%Test" eq "@59" then
  570.    set Line1=`Use this option to test a ZIP-file, this is a stand-alone  `^set Line2=`option; Other options not possible. Hit a key to continue. `
  571.    gosub Help^goto Line2D^else^gosub Messagebox^goto Line2D^endiff
  572.  
  573.    :Line3D
  574.    # 12 46 bla on bri red N^screen 12 46^inkey /c %%View^check %View
  575.    iff "%View" eq "@72" then^gosub Empty^goto Line2D^elseiff "%View" eq "@80" then^set View=N^endiff
  576.    iff "%View" eq "@28" .or. "%View" eq "N" then^set View=N^# 12 46 bla on bri red No^goto Line4D^endiff
  577.    iff "%View" eq "Y" then^# 12 46 bla on bri red Yes^goto Line9D^elseiff "%View" eq "@59" then
  578.    set Line1=`With this option you will get a listing of a ZIP-file with `^set Line2=`technical information. Hit a key to continue....           `
  579.    gosub Help^goto Line3D^else^gosub Messagebox^goto Line3D^endiff
  580.  
  581.    :Line4D
  582.    # 13 46 bla on bri red N^screen 13 46^inkey /c %%Change^check %Change^iff "%Change" eq "@28" .or. "%Change" eq "@80" then^set Change=N^endiff
  583.    iff "%Change" eq "@72" then^gosub Empty^goto Line3D^endiff
  584.    iff "%Change" eq "Y" .and. "%@ext[%Sourcepath]" ne "exe" then^# 13 46 bla on bri red Yes^goto Line9D^endiff
  585.    iff "%Change" eq "Y" .and. "%@ext[%sourcepath]" eq "exe" then^set Message=`File %@upper[%@filename[%Sourcepath]] is already a executable-file`
  586.    gosub Messagebox^unset /q Change^goto Line4D^endiff^iff "%Change" eq "N" then^# 13 46 bla on bri red No^goto Line5D^endiff
  587.    iff "%Change" eq "@59" then^set Line1=`You can make an existing ZIP-archive to be self-extracting. `
  588.    set Line2=`These EXE-files are called SFX-files. Hit a key to continue.`^gosub Help^goto Line4D^else^gosub Messagebox^goto Line4D^endiff
  589.  
  590.    :Line5D
  591.    # 14 46 bla on bri red N^screen 14 46^inkey /c %%Extract^check %Extract
  592.    iff "%Extract" eq "@72" then^gosub Empty^goto Line4D^elseiff "%Extract" eq "@80" then^set Extract=N^endiff
  593.    iff "%Extract" eq "@28" .or. "%Extract" eq "N" then^#  14 46 bla on bri red No^goto Line6D^endiff
  594.    if "%Extract" eq "Y" goto Subline5D^iff "%Extract" eq "@59" then^set Line1=`This option is to extract a file archived within a ZIP-file`
  595.    set Line2=`to screen, e.g. show the contents. Hit a key to continue.  `^gosub Help^goto Line5D^else^gosub Messagebox^goto Line5D^endiff
  596.  
  597.    :Subline5D
  598.    # 20 58 bla on bri red %@repeat[%@char[205],11]^# 14 46 bla on bri red ` `^# 14 13 blu on bri red `Give filename within ZIP-file :`^screen 14 46^input /l26 /c %%File
  599.    iff "%File" eq "" then^set Message=`You must enter a filename which will be extracted to screen`^gosub Messagebox^goto Subline5D^else goto Line8D^endiff
  600.  
  601.    :Line6D
  602.    # 15 46 bla on bri red N^screen 15 46^inkey /c %%Repair^check %Repair^iff "%Repair" eq "@28" .or. "%Repair" eq "@80" then^set Repair=N^endiff
  603.    iff "%Repair" eq "@72" then^gosub Empty^goto Line5D^endiff^if "%Repair" eq "@80" set Repair=N
  604.    iff "%Repair" eq "N" .or. "%Repair" eq "@28" then^# 15 46 bla on bri red No^goto Line7D^endiff
  605.    iff "%Repair" eq "Y" then^# 15 46 bla on bri red Yes^goto Line9D^elseiff "%Repair" eq "@59" then^set Line1=`If you got a message that a ZIP-file is probably corrupted, `
  606.    set Line2=`you can repair it with PKZIPFIX. Hit a key to continue.     `^gosub Help^goto Line6D^else^gosub Messagebox^goto Line6D^endiff
  607.  
  608.    :Line7D
  609.    # 16 46 bla on bri red N^screen 16 46^inkey /c %%Erase^check %Erase
  610.    iff "%Erase" eq "@72" then^gosub Empty^goto Line6D^elseiff "%Erase" eq "@80" then^set Erase=N^endiff
  611.    iff "%Erase" eq "@28" .or. "%Erase" eq "N" then^unset /q Erase^set Message=`* No options has been choosen, mainscreen will be opened *`^gosub Messagebox^goto Mainscreen^endiff
  612.    iff "%Erase" eq "Y" then^goto Subline7D^elseiff "%Erase" eq "@59" then^set Line1=`With this option you can delete an archived file within a  `
  613.    set Line2=`ZIP-file. Hit a key to continue.                           `^gosub Help^goto Line7D^else^gosub Messagebox^goto Line7D^endiff
  614.  
  615.    :Subline7D
  616.    # 20 58 bla on bri red %@repeat[%@char[205],11]^# 16 46 bla on bri red ` `^# 16 13 blu on bri red `Give filename within ZIP-file :`^screen 16 46^input /c %%File
  617.    iff "%File" eq "" then^set Message=`You must enter a filename which will be erased from %@upper[%@filename[%Sourcepath]]`^gosub Messagebox^goto Subline7D^else goto Line9D^endiff
  618.  
  619.    :Line8D
  620.    # 20 58 bla on bri red %@repeat[%@char[205],11]^screen 17 46^unset /q Psd^input /c /L17 /P %%Psd
  621.    iff "%Psd" eq "" then^# 17 46 bla on bri red ` [No password] `^ else^# 17 46 bla on bri red ` [Password hidden] `^endiff
  622.  
  623.    :Line9D
  624.    # 20 58 bri yel on bri red ` F1 = Help `^# 18 46 bla on bri red Y^screen 18 46^inkey /c %%Start^check %Start
  625.    iff "%Start" eq "@72" then^gosub Empty^goto Line7D^endiff
  626.    iff "%Start" eq "@28" .or. "%Start" eq "Y" then^set Start=Y^goto Maintainance^endiff
  627.    iff "%Start" eq "N" then^# 18 46 bla on bri red No^goto Screen4^elseiff "%Start" eq "Q" then^goto Mainscreen^endiff
  628.    iff "%Start" eq "@59" then^set Line1=`YES starts the program, NO returns to the beginning of this`
  629.    set Line2=`screen. Quit invokes the Mainscreen. Hit a key to continue.`^gosub Help^goto Line9D^else^gosub Messagebox^goto Line9D^endiff
  630.  
  631. :Screen5
  632.    cls bla on bla border bla^gosub Topscreen^gosub Background2
  633.    if %_Ansi eq 1 color bla on bri red
  634.    drawbox 08 10 22 72 02 bla on bri red shadow
  635.    # 22 12 blu on bri red ` Ctrl-Break = Mainscreen `
  636.    do Line = 09 to 21
  637.     # %Line 11 bri yel on bri red %@repeat[%@char[255],61]
  638.    enddo
  639.  
  640.    # 08 30 bla on bri red ` Setup Configuration `
  641.    # 10 13 bri yel on bri red `Archive also hidden- and systemfiles (Y/N):`
  642.    # 11 13 bri yel on bri red `Default, Maximum or No compression (D/M/N):`
  643.    # 12 13 bri yel on bri red `Mask Hidden, System & ReadOnly files (Y/N):`
  644.    # 13 13 bri yel on bri red `Enable ANSI codes in comments        (Y/N):`
  645.    # 14 13 bri yel on bri red `Use date/time latest archived file   (Y/N):`
  646.    # 15 13 bri yel on bri red `Use Temp-variable as Workdirectory   (Y/N):`
  647.    # 16 13 bri yel on bri red `Add file-comments using DESCRIPT.ION (Y/N):`
  648.    # 17 13 bri yel on bri red `Use AV-code (registered PKZIP users) (Y/N):`
  649.    # 18 13 bri yel on bri red `Create Default or Small .EXE files   (D/S):`
  650.    # 19 13 bri yel on bri red `Save configuration in 4ZIP.CFG       (Y/N):`
  651.    # 20 13 bri yel on bri red `Back to the Mainscreen               (Y/N):`
  652.  
  653.    :Line1E
  654.    # 22 58 bri yel on bri red ` F1 = Help `
  655.    # 10 57 bla on bri red N^if "%Attribute" ne "" .and. "%Attribute" ne "" # 10 60 bla on bri red (%@upper[%Attribute] is used)
  656.    screen 10 57^inkey /c %%Attribute^check %Attribute^if "%Attribute" eq "@80" set Attribute=N
  657.    iff "%Attribute" eq "@28" .or. "%Attribute" eq "N" then^set Attribute=N^# 10 57 bla on bri red `No            `^goto Line2E^endiff
  658.    iff "%Attribute" eq "Y" then^# 10 57 bla on bri red `Yes           `^goto Line2E^elseiff "%Attribute" eq "@59" then
  659.    set Line1=`Default ZIP won't archive system and hidden files. If you  `^set Line2=`want to archive these, choose YES !  Hit a key to continue.`
  660.    gosub Help^unset /q Attribute^goto Line1E^else^gosub Messagebox^unset /q Attribute^goto Line1E^endiff
  661.  
  662.    :Line2E
  663.    # 11 57 bla on bri red D^if "%Method" ne "" .and. "%Method" ne "" # 11 60 bla on bri red (%@upper[%Method] is used)
  664.    screen 11 57^inkey /c %%Method^check %Method
  665.    iff "%Method" eq "@72" then^unset Method Attribute^# 11 57 bla on bri red %@repeat[%@char[255],15]^# 10 57 bla on bri red `   `^goto Line1E
  666.    elseiff "%Method" eq "@80" then^set Method=D^endiff
  667.    iff "%Method" eq "@28" .or. "%Method" eq "D" then^set Method=D^# 11 57 bla on bri red `Default        `^goto Line3E^endiff
  668.    iff "%Method" eq "M" then^# 11 57 bla on bri red `Maximum        `^goto Line3E^endiff
  669.    iff "%Method" eq "N" then^# 11 57 bla on bri red No (store only)^goto Line3E^elseiff "%Method" eq "@59" then
  670.    set Line1=`For more speed during the ZIP-proces choose DEFAULT or NONE`^set Line2=`This will however compress LESS !  Hit a key to continue.  `
  671.    gosub Help^unset /q Method^goto Line2E^else^gosub Messagebox^unset /q Method^goto Line2E^endiff
  672.  
  673.    :Line3E
  674.    # 12 57 bla on bri red N^if "%Mask" ne "" .and. "%Mask" ne "" # 12 60 bla on bri red (%@upper[%Mask] is used)
  675.    screen 12 57^inkey /c %%Mask^check %Mask
  676.    iff "%Mask" eq "@72" then^unset Mask Method^# 12 57 bla on bri red %@repeat[%@char[255],15]^# 11 57 bla on bri red %@repeat[%@char[255],15]
  677.    goto Line2E^elseiff "%Mask" eq "@80" then^set Mask=N^endiff
  678.    iff "%Mask" eq "@28" .or. "%Mask" eq "N" then^set Mask=N^# 12 57 bla on bri red `No            `^goto Line4E^endiff
  679.    iff "%Mask" eq "Y" then^# 12 57 bla on bri red `Yes           `^goto Line4E^elseiff "%Mask" eq "@59" then
  680.    set Line1=`You can MASK the readonly, system and hidden files, so that`^set Line2=`you can treate them as writable files. Hit a key...        `
  681.    gosub Help^unset /q Mask^goto Line3E^else^gosub Messagebox^unset /q Mask^goto Line3E^endiff
  682.  
  683.    :Line4E
  684.    # 13 57 bla on bri red N^if "%Ansi" ne "" .and. "%Ansi" ne "" # 13 60 bla on bri red (%@upper[%Ansi] is used)
  685.    screen 13 57^inkey /c %%Ansi^check %Ansi
  686.    iff "%Ansi" eq "@72" then^unset Ansi Mask^# 13 57 bla on bri red %@repeat[%@char[255],15]^# 12 57 bla on bri red `   `^goto Line3E
  687.    elseiff "%Ansi" eq "@80" then^set Ansi=N^endiff
  688.    iff "%Ansi" eq "@28" .or. "%Ansi" eq "N" then^set Ansi=N^# 13 57 bla on bri red `No            `^goto Line5E^endiff
  689.    iff "%Ansi" eq "Y" then^# 13 57 bla on bri red `Yes           `^goto Line5E^elseiff "%Ansi" eq "@59" then
  690.    set Line1=`Setting this option will display ANSI sequences unaltered. `^set Line2=`Not displaying is the default.  Hit a key to continue.     `
  691.    gosub Help^unset /q Ansi^goto Line4E^else^gosub Messagebox^unset /q Ansi^goto Line4E^endiff
  692.  
  693.    :Line5E
  694.    # 14 57 bla on bri red N^if "%Zipdate" ne "" .and. "%Zipdate" ne "" # 14 60 bla on bri red (%@upper[%Zipdate] is used)
  695.    screen 14 57^inkey /c %%Zipdate^check %Zipdate
  696.    iff "%Zipdate" eq "@72" then^unset Zipdate Ansi^# 14 57 bla on bri red %@repeat[%@char[255],15]^# 13 57 bla on bri red `   `
  697.    goto Line4E^elseiff "%Zipdate" eq "@80" then^set Zipdate=N^endiff
  698.    iff "%Zipdate" eq "@28" .or. "%Zipdate" eq "N" then^set Zipdate=N^# 14 57 bla on bri red `No            `^goto Line6E^endiff
  699.    iff "%Zipdate" eq "Y" then^# 14 57 bla on bri red `Yes           `^goto Line6E^elseiff "%Zipdate" eq "@59" then
  700.    set Line1=`You can give the ZIP-file today's date (defualt) or give it`^set Line2=`the date of the latest archived file. Hit a key to continue`
  701.    gosub Help^unset /q Zipdate^goto Line5E^else^gosub Messagebox^unset /q Zipdate^goto Line5E^endiff
  702.  
  703.    :Line6E
  704.    # 15 57 bla on bri red N^if "%Workdir" ne "" .and. "%Workdir" ne "" # 15 60 bla on bri red (%@upper[%Workdir] is used)
  705.    screen 15 57^inkey /c %%Workdir^check %Workdir
  706.    iff "%Workdir" eq "@72" then^unset Workdir Zipdate^# 15 57 bla on bri red %@repeat[%@char[255],15]
  707.    # 14 57 bla on bri red `               `^goto Line5E^elseiff "%Workdir" eq "@80" then^set Workdir=N^endiff
  708.    iff "%Workdir" eq "@28" .or. "%Workdir" eq "N" then^set Workdir=N^# 15 57 bla on bri red No %@repeat[%@char[255],12]^goto Line7E^endiff
  709.    iff "%Workdir" eq "Y" then^set Workdir=Y^# 15 57 bla on bri red `Yes           `^ elseiff "%Workdir" eq "@59" then
  710.    set Line1=`If you have set your TEMP-directory, you can use TEMP to   `^set Line2=`speed up the archive process. Hit a key to continue.       `
  711.    gosub Help^unset /q Workdir^goto Line6E^else^gosub Messagebox^unset /q Workdir^goto Line6E^endiff
  712.  
  713.    :Line7E
  714.    # 16 57 bla on bri red N^if "%Comment" ne "" .and. "%Comment" ne "" # 16 60 bla on bri red (%@upper[%Comment] is used)
  715.    screen 16 57^inkey /c %%Comment^check %Comment
  716.    iff "%Comment" eq "@72" then^unset Comment Workdir^# 16 57 bla on bri red %@repeat[%@char[255],15]^# 15 57 bla on bri red `   `
  717.    goto Line6E^elseiff "%Comment" eq "@80" then^set Comment=N^endiff
  718.    iff "%Comment" eq "@28" .or. "%Comment" eq "N" then^set Comment=N^# 16 57 bla on bri red `No            `^goto Line8E^endiff
  719.    iff "%Comment" eq "Y" then^# 16 57 bla on bri red `Yes           `^goto Line8E^elseiff "%Comment" eq "@59" then
  720.    set Line1=`If this option is activated, you will be prompted to give a`^set Line2=`description for each file. Hit a key to continue.          `
  721.    gosub Help^unset /q Comment^goto Line7E^else^gosub Messagebox^unset /q Comment^goto Line7E^endiff
  722.  
  723.    :Line8E
  724.    # 17 57 bla on bri red N^if "%Av" ne "" .and. "%Av" ne "" # 17 60 bla on bri red (%@upper[%Av] is used)
  725.    screen 17 57^inkey /c %%Av^check %Av
  726.    iff "%Av" eq "@72" then^unset Av Comment^# 17 57 bla on bri red %@repeat[%@char[255],15]^# 16 57 bla on bri red `   `
  727.    goto Line7E^elseiff "%Av" eq "@80" then^set Av=N^endiff
  728.    iff "%Av" eq "@28" .or. "%Av" eq "N" then^set Av=N^# 17 57 bla on bri red `No            `^goto Line9E^endiff
  729.    iff "%Av" eq "Y" then^# 17 57 bla on bri red `Yes           `^goto Line9E^elseiff "%Av" eq "@59" then
  730.    set Line1=`If you a registered PKZIP user, you can use the so called `^set Line2=`AV-codes. Don't use this if you not registered. Hit a key. `
  731.    gosub Help^unset /q Av^goto Line8E^else^gosub Messagebox^unset /q Av^goto Line8E^endiff
  732.  
  733.    :Line9E
  734.    # 18 57 bla on bri red D^if "%Exe" ne "" .and. "%Exe" ne "" # 18 59 bla on bri red (%@upper[%Exe] is used)
  735.    screen 18 57^inkey /c %%Exe^check %Exe
  736.    iff "%Exe" eq "@72" then^unset Exe Av ^# 18 57 bla on bri red %@repeat[%@char[255],15]^# 17 57 bla on bri red `   `
  737.    goto Line8E^elseiff "%Exe" eq "@80" then^set Exe=D^endiff
  738.    iff "%Exe" eq "@28" .or. "%Exe" eq "D" then^set Exe=D^# 18 57 bla on bri red `Default      `^goto Line10E^endiff
  739.    iff "%Exe" eq "S" then^# 18 57 bla on bri red `Small        `^goto Line10E^elseiff "%Exe" eq "@59" then
  740.    set Line1=`When creating .EXE files you can make the default large SFX`^set Line2=`and the limited but smaller SFX. Hit a key to continue.    `
  741.    gosub Help^unset /q Exe^goto Line9E^else^gosub Messagebox^unset /q Exe^goto Line9E^endiff
  742.  
  743.    :Line10E
  744.    # 22 58 bri yel on bri red ` F1 = Help `^# 19 57 bla on bri red N^screen 19 57^inkey /c %%Savecfg^check %Savecfg
  745.    iff "%Savecfg" eq "@72" then^unset Savecfg Exe^# 19 57 bla on bri red `   `^goto Line9E^endiff
  746.    iff "%Savecfg" eq "@28" .or. "%Savecfg" eq "@80" then^set Savecfg=N^endiff
  747.    iff "%Savecfg" eq "Y" .and. not exist %@search[batcomp.exe] then^set Message=`4DOS compresser BATCOMP.EXE missing, can't create 4ZIP.CFG!`
  748.    gosub Messagebox^set Savecfg=N^# 19 57 bla on bri red No^goto Line11E^endiff
  749.    if "%Savecfg" eq "Y" goto SubLine10E
  750.    iff "%Savecfg" eq "N" then^set Savecfg=N^# 19 57 bla on bri red No^goto Line11E^endiff
  751.    iff "%Savecfg" eq "@59" then^set Line1=`If you want 4ZIP to save the configuration and to reload it`
  752.    set Line2=`during start-up, choose YES. Hit a key to continue....     `^gosub Help^goto Line10E^else^gosub Messagebox^goto Line10E^endiff
  753.  
  754.    :SubLine10E
  755.    # 22 58 bla on bri red %@repeat[%@char[205],11]
  756.    iff exist %@search[4zip.cfg] then^set Cfgpath=%@upper[%@search[4zip.cfg]]^else^set Cfgpath=%@upper[%@path[%@search[4dos.com]]4zip.cfg]^endiff
  757.    # 19 11 bri yel on bri red %@repeat[%@char[255],61]^# 19 13 bri yel on bri red Full path for 4ZIP.CFG :
  758.    screen 19 38^input /c /E /L34 %%Cfgpath
  759.    iff %@removable[%@instr[0,2,%Cfgpath]] eq 1 then^set Message=`The configurationfile can only be created on a fixed disk`^gosub Messagebox^goto SubLine10E^endiff
  760.    iff %@filename[%Cfgpath] ne 4ZIP.CFG .or. not isdir %@path[%Cfgpath] then^set Message=`Syntax error : Filename must be 4ZIP.CFG or incorrect path`
  761.    gosub Messagebox^goto SubLine10E^endiff
  762.  
  763.    :Line11E
  764.    # 22 58 bri yel on bri red ` F1 = Help `^# 20 57 bla on bri red Y^screen 20 57^inkey /c %%Main^check %Main
  765.    iff "%Main" eq "@72" then^unset Main Savecfg^# 19 13 bri yel on bri red `Save configuration in 4ZIP.CFG       (Y/N):               `
  766.    # 20 57 bla on bri red `   `^goto Line10E^endiff
  767.    iff "%Main" eq "@59" then^set Line1=`YES returns to the mainscreen, NO causes 4ZIP to go back to`
  768.    set Line2=`the beginning of this screen. Hit a key to continue.       `^gosub Help^goto Line11E^endiff
  769.    iff %@index[YN@28,%Main] eq -1 then^gosub Messagebox^goto Line11E^endiff^iff "%Main" eq "N" then^# 20 57 bla on bri red No^goto Screen5^endiff
  770.    iff "%Main" eq "Y" .or. "%Main" eq "@28" then^# 20 57 bla on bri red Yes^endiff^if "%Savecfg" eq "Y" gosub CFG_Create
  771.    iff "%Error" eq "Y" then^set Message=`%@upper[%@Path[%Cfgpath]] not matching your PATH, 4ZIP.CFG will be deleted`
  772.    gosub Messagebox^unset Error^goto SubLine10E^else^goto Mainscreen^endiff
  773.  
  774. :Archive
  775.    cls %Origcolor^if exist %@path[%Archivepath]pk_sel del /q %@path[%Archivepath]pk_sel
  776.    iff "%Attribute" eq "Y" then^set CFG1=-whs       ^else^unset /q CFG1 ^endiff
  777.    iff "%Method"    eq "M" then^set CFG2=-ex        ^elseiff "%Method" eq "N" then
  778.    set CFG2=-e0^else^set CFG2=-en^endiff
  779.    iff "%Mask"      eq "Y" then^set CFG3=-jhrs      ^else^set CFG3=-Jhrs^endiff
  780.    iff "%Ansi"      eq "Y" then^set CFG4=-q         ^else^unset /q CFG4 ^endiff
  781.    iff "%Zipdate"   eq "Y" then^set CFG5=-o         ^else^unset /q CFG5 ^endiff
  782.    iff "%Workdir"   ne ""  then^set CFG6=-b%Temp    ^else^unset /q CFG6 ^endiff
  783.    iff "%Comment"   eq "Y" then^set CFG7=-C         ^else^unset /q CFG7 ^endiff
  784.    iff "%Av"        eq "Y" then^set CFG8=-!         ^else^unset /q CFG8 ^endiff
  785.    iff "%Exe"       eq "S" then^set CFG9=-j         ^else^unset /q CFG9 ^endiff
  786.    iff "%Psd"       ne ""  then^set Psd=-s%Psd      ^else^unset /q Psd  ^endiff
  787.    iff "%Subdir"    eq "Y" then^set Subdir=-r       ^else^unset Subdir  ^endiff
  788.    iff "%Store"     eq "Y" then^set Store=-P        ^else^unset Store   ^endiff
  789.  
  790.    iff "%Volumes" eq "Y" then^unset /q CFG6^inkey /k"FW" Do you want to FORMAT or only WIPE the targetdrive ? (F/W) %%Answer^endiff
  791.    iff "%Answer"  eq "F" then^set Volumes=-&u^elseiff "%Answer" eq "W" then^set Volumes=-&w^else unset /q Volumes^endiff
  792.    iff "%Volumes" eq "N" then^unset Volumes^endiff^if %Select ne Y goto Pkzip
  793.  
  794.    :Pkselect
  795.    pushd %@path[%Archivepath]^iff "%CFG1" eq "-whs" then^select /a-d /deo:en Echo (%Archivepath) >>! pk_sel^else
  796.    select /a-d-h /deo:en Echo (%Archivepath) >>! pk_sel^endiff
  797.    iff not exist pk_sel then^echo No Files selected^pause^popd^goto Mainscreen^else^popd^goto Pkzip^endiff
  798.  
  799.    :Pkzip
  800.    iff exist %@search[PKZIP.CFG] then^pushd %@path[%@search[PKZIP.CFG]]^ren /q PKZIP.CFG PKZIP.TMP^popd^endiff
  801.    pushd %@path[%Archivepath]^Timer > nul^if exist %_Boot:\ziptime.dat del /q %_Boot:\ziptime.dat
  802.    iff select ne Y .and. "%Subdir" ne "-r" .and. not exist %@filename[%Archivepath] then^echo No valid Files found in %@upper[%@path[%Archivepath]]
  803.    pause^popd^goto Mainscreen^endiff^iff select ne Y .and. "%Subdir" eq "-r" then^global /iq (if exist %@filename[%Archivepath] set found=Y)^endiff
  804.    iff select ne Y .and. "%Subdir" eq "-r" .and. %found ne Y then^echo No valid Files found in %@upper[%@path[%Archivepath]] and in recursive directories
  805.    pause^popd^goto Mainscreen^endiff^unset /q found
  806.    if not exist pk_sel .and. "%Subdir" eq "-r" dir %@filename[%Archivepath] /a:-d /fhkms >>! pk_sel
  807.    if not exist pk_sel .and. "%Subdir" ne "-r" dir %@filename[%Archivepath] /a:-d /fhkm  >>! pk_sel
  808.    gosub Pkdescribe
  809.    iff "%CFG7" eq "-C" .and. "%CFG1" ne "" then^for /A %A in (@pk_sel) do gosub PkComment
  810.    elseiff "%CFG7" eq "-C" .and. "%CFG1" eq "-whs" then^for %A in (@pk_sel) do gosub PkComment^endiff
  811.    if "%CFG7" ne "-C" PKZIP %Command %CFG1 %CFG2 %CFG3 %CFG4 %CFG5 %CFG6 %CFG8 -xdescript.ion -xpk_sel %Psd %Volumes %Verify %Store %Targetpath @pk_sel
  812.    if exist pk_sel del /q pk_sel^if exist 4zip.ion del /q 4zip.ion^cls^popd
  813.    if errorlevel ne 0 goto Pkfinish^iff %Test eq Y then^goto Pktest^elseiff %Sfx eq Y then^goto Pksfx^else^goto Pkfinish^endiff
  814.  
  815.    :Pktest
  816.    iff "%Volumes" ne "" then^echo Testing skipped: Not possible while archiving on diskettes^goto Pkfinish^endiff
  817.    PKUNZIP -t %Psd %Targetpath^iff %Sfx eq Y then^goto Pksfx^else^goto Pkfinish^endiff
  818.  
  819.    :Pksfx
  820.    iff not exist %@search[zip2exe.*] then^beep^echo The ZIP-file %@upper[%@name[%Targetpath]] cannot be converted to a .EXE-file
  821.    echo because program ZIP2EXE cannot be found.^ goto Pkfinish^endiff^pushd %@path[%Targetpath]
  822.    iff "%@ext[%@filename[%Targetpath]]" eq "EXE" then^ren /q %@filename[%Targetpath] %@name[%Targetpath].ZIP
  823.    ZIP2EXE %CFG9 %@name[%Targetpath].ZIP^del /q %@name[%Targetpath].ZIP^else^ZIP2EXE %Targetpath^del /q %Targetpath^endiff^popd
  824.  
  825.    :Pkfinish
  826.    timer >! %_Boot:\ziptime.dat^set ziptime=%@substr[%@line[%_boot:\ziptime.dat,0],%@eval[%@len[%@line[%_boot:\ziptime.dat,0]]-8],5]
  827.    del /q %_Boot:\ziptime.dat^iff errorlevel ne 0 then^gosub ZipErrors^else^snd
  828.    if %Sfx eq Y .and. exist %@search[zip2exe.*] set Targetpath=%@path[%Targetpath]%@name[%Targetpath].EXE
  829.    if "%@ext[%targetpath]" eq "" set targetpath=%Targetpath.zip
  830.    echo Archive-file %@upper[%@filename[%Targetpath]] succesfully created/updated in %@upper[%@path[%Targetpath]]
  831.    echo Total time elapsed: %ziptime Minutes^echo Filesize of %@upper[%@filename[%Targetpath]] : %@filesize[%Targetpath,bc] Bytes
  832.    unset ziptime^endiff^Pause^unset /q Answer^
  833.    iff exist %@search[PKZIP.TMP] then^pushd %@path[%@search[PKZIP.TMP]]^ ren /q PKZIP.TMP PKZIP.CFG^popd^endiff
  834.    goto Mainscreen
  835.  
  836.    :PkComment
  837.    setdos /s0:0
  838.    if "%@filename[%A]" eq "descript.ion" .or. "%@filename[%A]" eq "pk_sel" .or. "%@filename[%A]" eq "pkzip.tmp" .or. "%@filename[%A]" eq "%@filename[%Targetpath]" return
  839.    iff "%@descript[%A]" ne "" then
  840.    echo %@descript[%A] | PKZIP %Command %CFG1 %CFG2 %CFG3 %CFG4 %CFG5 %CFG6 %CFG8 -C %Psd %Volumes %Verify %Store %Targetpath %A
  841.    scrput %@dec[%_Row] 0 %_Bg on %_Bg %@repeat[%@char[255],79]^screen 0 0^else
  842.    PKZIP %Command %CFG1 %CFG2 %CFG3 %CFG4 %CFG5 %CFG8 %Psd %Volumes %Verify %Store %Targetpath %A
  843.    scrput %@dec[%_Row] 0 %_Bg on %_Bg %@repeat[%@char[255],79]^screen 0 0
  844.    endiff^setdos /s15:100^return
  845.  
  846.    :Pkdescribe
  847.    iff "%Subdir" ne "" then^global /iq (if exist descript.ion set ION=Y)^else^if exist descript.ion set ION=Y^endiff
  848.    iff %ION eq Y then^unset ION^screen 1 0 Saving 4DOS-descriptions, one moment please . . .^screen 0 0^else^return^endiff
  849.    set handle=%@fileopen[pk_sel,read]^set _Sign=176^set _Col=0^setdos /s0:0
  850.    do forever
  851.     set _Val=%@fileread[%handle]
  852.     if "%_Col" eq "48" (set _Col=0^set _Sign=%@inc[%_Sign]^if %_Sign gt 178 set _Sign=176)
  853.     if "%_Val" eq "**EOF**" leave
  854.     set _Name=%@word[0,%_Val]
  855.     if "%@descript[%_Name]" ne "" echo %@filename[%_Name] %@descript[%_Name] >>! 4zip.ion
  856.     set _Col=%@inc[%_Col]^scrput 03 %_Col %_Bg on %_Fg %@char[%_Sign]
  857.    enddo
  858.    if exist 4zip.ion echo %_Cwds%4zip.ion >>! pk_sel^unset /q handle _Col _Sign _Name _Val^setdos /s15:100^screen 0 0
  859.    return
  860.  
  861. :Extract
  862.    cls %Origcolor
  863.    iff "%Mask"      eq "Y" then^set CFG3=-jhrs ^else^set CFG3=-Jhrs ^endiff
  864.    iff "%Ansi"      eq "Y" then^set CFG4=-q    ^else^unset /q CFG4  ^endiff
  865.    iff "%Over"      eq "Y" then^set Over=-o    ^else^unset /q Over  ^endiff
  866.    iff "%Subdir"    eq "Y" then^set Subdir=-d  ^else^unset /q Subdir^endiff
  867.    iff "%Psd"       ne ""  then^set Psd=-s%Psd ^else^unset /q Psd   ^endiff
  868.    if "%Skip_A"     ne ""  set Skip_A=-x%Skip_A
  869.    if "%Skip_B"     ne ""  set Skip_B=-x%Skip_B
  870.    if "%Skip_C"     ne ""  set Skip_C=-x%Skip_C
  871.  
  872.    if "%Test" eq "N" goto Pkext^PKUNZIP -t %Psd %Sourcepath^iff errorlevel ne 0 then
  873.    gosub UnZipErrors^echo Incorrect ZIP-file, use Repair-option (PKZIPFIX), program aborted !
  874.    pause^goto Mainscreen^else^cls^endiff
  875.  
  876.    :Pkext
  877.    If not isdir %Extractpath md %Extractpath^if not isdir %Extractpath (echo Error in creating %Extractpath (wrong syntax)^pause^goto Mainscreen)
  878.    pushd %Extractpath^Timer > nul
  879.    PKUNZIP -en %Sourcepath %Extractfile 4zip.ion %CFG3 %CFG4 %Over %Skip_A %Skip_B %Skip_C %Subdir %Psd
  880.    global /iq (if exist 4ZIP.ION set Startpath=%_Cwds%4ZIP.ION)^popd^iff "%Startpath" ne "" .and. "%Subdir" ne "" then^pushd %@path[%Startpath]
  881.    if not exist 4ZIP.ION (echo Error in locating temp-file 4ZIP.ION with descriptions^pause^return)
  882.    cls^set _Sign=176^set _Col=0^setdos /s0:0^global /iq (gosub PkDescript^if "%@fileclose[%handle]" eq "-1" echo Error on closing file 4ZIP.ION)
  883.    unset /q handle _Val _Name _Desc _Col _Sign^popd^setdos /s15:100^elseiff "%Startpath" ne "" then^pushd %@path[%Startpath]
  884.    if not exist 4ZIP.ION (echo Error in locating temp-file 4ZIP.ION with descriptions^pause^return)^cls^set _Sign=176^set _Col=0^setdos /s0:0
  885.    gosub Pkdescript^if "%@fileclose[%handle]" eq "-1" echo Error on closing file 4ZIP.ION^unset /q handle _Val _Name _Desc _Col _Sign^popd^setdos /s15:100^endiff
  886.    if exist %Startpath del /q %Startpath^Timer >! %_Boot:\ziptime.dat^set ziptime=%@substr[%@line[%_boot:\ziptime.dat,0],%@eval[%@len[%@line[%_boot:\ziptime.dat,0]]-8],5]
  887.    if exist %_Boot:\ziptime.dat del /q %_Boot:\ziptime.dat^iff errorlevel le 1 then^snd
  888.    echo Archive-file %@upper[%@filename[%Sourcepath]] succesfully extracted in %@upper[%@path[%Extractpath]]
  889.    echo Total time elapsed: %ziptime Minutes^else^gosub UnZipErrors^endiff^unset /q ziptime^Pause^goto Mainscreen
  890.  
  891.   :PkDescript
  892.    screen 1 0 Restoring 4DOS-descriptions, one moment please . . . ^ set handle=%@fileopen[%Startpath%,read]
  893.    do forever
  894.     if "%_Col" eq "51" (set _Col=0^set _Sign=%@inc[%_Sign]^if %_Sign gt 178 set _Sign=176)
  895.     set _Val=%@fileread[%handle]
  896.     if %_Val eq **EOF** leave
  897.     set _Name=%@word[0,%_Val]
  898.     set _Desc=%@trim[%@instr[%@len[%@word[0,%_Val]],%@len[%_Val],%_Val]]
  899.     if exist %_Name .and. %@attrib[%_Name%,h] eq 0 (echo %_Desc | describe %_Name)
  900.     set _Col=%@inc[%_Col]
  901.     scrput 03 %_Col %_Bg on %_Fg %@char[%_Sign]
  902.    enddo
  903.    screen 5 0^return
  904.  
  905. :Sort
  906.    cls %Origcolor
  907.    echo One moment please . . . 
  908.    PKUNZIP %Sort %Sourcepath | list /s^if errorlevel gt 1 gosub UnZipErrors^pause^goto Mainscreen
  909.  
  910. :Maintainance
  911.    cls %Origcolor
  912.    iff "%Psd" ne ""  then^set Psd=-s%Psd^else^unset /q Psd^endiff
  913.    iff %Test eq Y then^PKUNZIP -t %Sourcepath %Psd^if errorlevel gt 1 gosub UnZipErrors^Pause^unset Test^goto Mainscreen^else^unset /q Test^endiff
  914.    iff %View eq Y then^PKZIP -vtn %Sourcepath | list /s^if errorlevel gt 1 gosub UnZipErrors^Pause^unset View^goto Mainscreen^else^unset /q View^endiff
  915.    iff %Extract eq Y then^PKUNZIP -cm  %Sourcepath %File %Psd^if errorlevel gt 1 gosub UnZipErrors^Pause^unset Extract^goto Mainscreen^else^unset /q Extract^endiff
  916.    iff %Erase eq Y then^PKZIP -d %Sourcepath %File^if errorlevel ne 0 gosub ZipErrors^Pause^unset Erase^goto Mainscreen^else^ unset /q Erase^endiff
  917.    if %Change eq Y goto Pkchange^if %Repair eq Y goto Pkrepair
  918.  
  919.    :Pkchange
  920.    iff not exist %@search[zip2exe.*] then^beep^echo The ZIP-file %@upper[%@filename[%Sourcepath]] cannot be converted to a .EXE-file
  921.    echo because program ZIP2EXE cannot be found.^ goto Mainscreen^endiff^pushd %@path[%Sourcepath]
  922.    iff "%Exe" eq "S" then^set CFG9=-j^else^unset /q CFG9 ^endiff
  923.    ZIP2EXE %CFG9 %Sourcepath^iff errorlevel eq 0 then^del %Sourcepath >& nul^else^beep^echo Error detected, is %@upper[%@filename[%Sourcepath]] really a ZIP-file ?
  924.    endiff^popd^Pause^goto Mainscreen
  925.  
  926.    :Pkrepair
  927.    iff not exist %@search[pkzipfix.*] then^beep^echo The ZIP-file %@upper[%@filename[%Sourcepath]] cannot be repaired
  928.    echo because program PKZIPFIX cannot be found.^Pause^goto Mainscreen^endiff^pushd %@path[%Sourcepath]^PKZIPFIX %Sourcepath
  929.    iff "%@ext[%Sourcepath]" eq "exe" .and. exist %@search[zip2exe.*] then
  930.    ZIP2EXE %CFG9 pkfixed.zip^copy /q pkfixed.exe %Sourcepath >& nul^del pkfixed.* >& nul^elseiff "%@ext[%Sourcepath]" eq "zip" then
  931.    copy /q pkfixed.zip %Sourcepath >& nul^del /q pkfixed.zip >& nul^endiff
  932.    iff "%@ext[%Sourcepath]" eq "exe" .and. errorlevel eq 0 then^# -1 30 %_fg on %_bg PKFIXED.EXE renamed into %@upper[%@filename[%Sourcepath]]^endiff
  933.    iff "%@ext[%Sourcepath]" eq "zip" .and. errorlevel eq 0 then^# -2 30 %_fg on %_bg PKFIXED.ZIP renamed into %@upper[%@filename[%Sourcepath]]^endiff
  934.    if errorlevel ne 0 echo Something went wrong, did you really process a ZIP-file ??
  935.    Pause^goto Mainscreen
  936.